using System;
using System.Collections.Generic;
using System.Text;

namespace BDDfyIt.CodeDom
{
    internal static class Extensions
    {
        internal static T ParseEnum<T>(string value, T defaultValue)
        {
            if (Enum.IsDefined(typeof(T), value))
            {
                return (T)Enum.Parse(typeof(T), value);
            }
            return defaultValue;
        }
    }
}